// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_MST_COMMON_ITEM
// * CreateDate    : 2014-06-12 19:20:59
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-12 19:20:59
// * LastChanger   : 2014-06-12 19:20:59
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
    [Serializable]
    public partial class MstCommonItemEntity : EntityBase
    {
        public MstCommonItemTable TableSchema
        {
            get
            {
                return MstCommonItemTable.Current;
            }
        }

        public MstCommonItemEntity()
        {

        }

        public MstCommonItemEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.ItemCode = Convert.ToString(CommonFunctions.ToObject(dr["ITEM_CODE"]));
            this.ItemName = Convert.ToString(CommonFunctions.ToObject(dr["ITEM_NAME"]));
            this.ItemType = Convert.ToString(CommonFunctions.ToObject(dr["ITEM_TYPE"]));
            this.ItemValue = Convert.ToString(CommonFunctions.ToObject(dr["ITEM_VALUE"]));
            this.Sequence = Convert.ToInt32(CommonFunctions.ToObject(dr["SEQUENCE"]));
            this.IsDeleted = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_DELETED"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public MstCommonItemEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.ItemCode = Convert.ToString(CommonFunctions.ToObject(dr["ITEM_CODE"]));
            this.ItemName = Convert.ToString(CommonFunctions.ToObject(dr["ITEM_NAME"]));
            this.ItemType = Convert.ToString(CommonFunctions.ToObject(dr["ITEM_TYPE"]));
            this.ItemValue = Convert.ToString(CommonFunctions.ToObject(dr["ITEM_VALUE"]));
            this.Sequence = Convert.ToInt32(CommonFunctions.ToObject(dr["SEQUENCE"]));
            this.IsDeleted = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_DELETED"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return MstCommonItemTable.Current;
            }
        }

        #region Perporty List
        [DataMember]
        public string ItemCode
        {
            get { return Convert.ToString(GetData(MstCommonItemTable.C_ITEM_CODE)); }
            set { SetData(MstCommonItemTable.C_ITEM_CODE, value); }
        }

        [DataMember]
        public string ItemName
        {
            get { return Convert.ToString(GetData(MstCommonItemTable.C_ITEM_NAME)); }
            set { SetData(MstCommonItemTable.C_ITEM_NAME, value); }
        }

        [DataMember]
        public string ItemType
        {
            get { return Convert.ToString(GetData(MstCommonItemTable.C_ITEM_TYPE)); }
            set { SetData(MstCommonItemTable.C_ITEM_TYPE, value); }
        }

        [DataMember]
        public string ItemValue
        {
            get { return Convert.ToString(GetData(MstCommonItemTable.C_ITEM_VALUE)); }
            set { SetData(MstCommonItemTable.C_ITEM_VALUE, value); }
        }

        [DataMember]
        public int Sequence
        {
            get { return Convert.ToInt32(GetData(MstCommonItemTable.C_SEQUENCE)); }
            set { SetData(MstCommonItemTable.C_SEQUENCE, value); }
        }

        [DataMember]
        public int IsDeleted
        {
            get { return Convert.ToInt32(GetData(MstCommonItemTable.C_IS_DELETED)); }
            set { SetData(MstCommonItemTable.C_IS_DELETED, value); }
        }

        [DataMember]
        public string Remark
        {
            get { return Convert.ToString(GetData(MstCommonItemTable.C_REMARK)); }
            set { SetData(MstCommonItemTable.C_REMARK, value); }
        }

        #endregion
    }


}

